Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add #[cold] to QueryIter::next_archetype #341

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

a1phyr
Copy link
Contributor

@a1phyr a1phyr commented Sep 21, 2023

Push further on the path opened by #336 by adding #[cold] to QueryIter::next_archetype

Results on my machine:

Before

test iterate_100k                    ... bench:      43,868 ns/iter (+/- 511)
test iterate_cached_100_by_50        ... bench:       1,003 ns/iter (+/- 13)
test iterate_mut_100k                ... bench:      44,154 ns/iter (+/- 601)
test iterate_mut_cached_100_by_50    ... bench:         142 ns/iter (+/- 42)
test iterate_mut_uncached_100_by_50  ... bench:         386 ns/iter (+/- 14)
test iterate_uncached_100_by_50      ... bench:       1,350 ns/iter (+/- 67)
test iterate_uncached_1_of_100_by_50 ... bench:         675 ns/iter (+/- 5)

After

test iterate_100k                    ... bench:      26,146 ns/iter (+/- 177)
test iterate_cached_100_by_50        ... bench:         595 ns/iter (+/- 9)
test iterate_mut_100k                ... bench:      26,362 ns/iter (+/- 363)
test iterate_mut_cached_100_by_50    ... bench:         141 ns/iter (+/- 3)
test iterate_mut_uncached_100_by_50  ... bench:         390 ns/iter (+/- 17)
test iterate_uncached_100_by_50      ... bench:       1,369 ns/iter (+/- 81)
test iterate_uncached_1_of_100_by_50 ... bench:         684 ns/iter (+/- 8)

@a1phyr
Copy link
Contributor Author

a1phyr commented Sep 21, 2023

Probably made obsolete by #342, but maybe you still want to keep that ?

@Ralith
Copy link
Owner

Ralith commented Sep 22, 2023

What's the before/after look like with #342? I recall not seeing any effect from this specific change on my machine, though variance between machines seems to be substantial for some reason.

@a1phyr
Copy link
Contributor Author

a1phyr commented Sep 25, 2023

With #342 this has no visible impact, this is why I am not sure if this should be kept ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants